package com.donn.securitycontrolplatform.sensor.controller;


import com.donn.securitycontrolplatform.common.Result;
import com.donn.securitycontrolplatform.sensor.entity.SensorDTO;
import com.donn.securitycontrolplatform.sensor.service.SensorService;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 标签和角色关联表 前端控制器
 * </p>
 *
 * @author zhenglixiang
 * @since 2022-06-10
 */
@RestController
@Tag(name = "SensorController", description = "接收传感器数据接口")
public class SensorController {

    @Autowired
    SensorService service;

    @ApiOperation(value = "接收传感器数据")
    @PostMapping("/api/XHJ_CARDC/Sensor/setInfo")
    @ResponseBody
    public Result add(@RequestBody SensorDTO sensorDTO) {
        return service.saveSensorData(sensorDTO);
    }


}
